#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#这里应该使用双下划线作为私有变量
class Student:

	@property
	def score(self):
		return self.__score

	@score.setter
	def score(self, score):
		if not isinstance(score, int):
			raise ValueError("score is not a number")
		if score > 100 or score < 0:
			raise ValueError("score is not valid")

		self.__score = score

s = Student()
s.score = 99
print(dir(s))
print(s.score)